<%@page import="java.net.URLDecoder"%>
<%@page import="domein.*"%>
<%
	String pageTitel = "Afspraak maken"; //pagina titel wordt getoond in header.jsp
%>
<!-- include header -->
<%@ include file="../skelet/header.jsp"%>
<!-- begin content -->
<div class="span12">
	<div class="hero-unit">


		<%
			String error = request.getParameter("error");
			if (error != null && !error.isEmpty()) {
		%>
		<div class="alert alert-error">
			<%
				out.println(URLDecoder.decode(error, "UTF-8") + "<br/>");
			%>
		</div>
		<%
			}
		%>

		<%
			String message = request.getParameter("message");
			if (message != null && !message.isEmpty()) {
		%>
		<div class="alert alert-succes">
			<%
				out.println(URLDecoder.decode(message, "UTF-8") + "<br/>");
			%>
		</div>
		<%
			}
		%>
		<h1>Afspraak maken.</h1>

		<form method="post" action="${pageContext.request.contextPath}/klant/MaakAfspraak.do">
			<label>Type afspraak:</label>
			<select name="type-afspraak">
				<option value"apkkeuring">APK keuring</option>
				<option value"onderhoudsbeurt">Onderhoudsbeurt</option>
			</select>
			<label>Monteur: </label> 
			<select name="monteur">
				<%					
					for (Personeel p : AutoTotaalDiensten.getPersoneelbyFunctie("monteur")){						
				%>
				<option value=<%=AutoTotaalDiensten.getPersonen().indexOf(p)%>>
					<%=p.getNaam()%>
				</option>
				<%
					}
				%>
			</select> 
			<label>Datum (dd-mm-yyyy):</label> <input type="text" name="datum"></input><br />
			<label>Tijd (hh:mm):</label> <input type="text" name="tijd"></input><br />
			<label>Omschrijving:</label>
			<textarea type="text" name="omschrijving" cols="40" rows="5"></textarea><br/> 
			<input type="submit" value="Maak afspraak!" />
		</form>

	</div>
</div>
<!-- eind content -->

<!-- include footer -->
<%@ include file="../skelet/footer.jsp"%>